/*

WinClip

   Copyright (C) 2011, Gowtham (gowthamgowtham@gmail.com)

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

*/

#include "inputdialog.h"
#include "ui_inputdialog.h"

InputDialog::InputDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::InputDialog)
{
    ui->setupUi(this);
    ui->txtText->setFocus();
}

InputDialog::~InputDialog()
{
    delete ui;
}

QString InputDialog::getText()
{
    return ui->txtText->document()->toPlainText();
}

void InputDialog::setInitialText(const QString &text)
{
    ui->txtText->document()->setPlainText(text);
    ui->txtText->selectAll();
}
